package com.lww.feature;

import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

import java.util.Arrays;
import java.util.List;

/**
 * @author: liweiwei
 * @date: 2019/1/28
 */
public class Main {
    public static void main(String[] args) {
        XmlBeanFactory context = new XmlBeanFactory(new ClassPathResource("beanFactoryTest.xml"));
        System.out.println(context.getBeanDefinitionCount());
        List<String> beanNames = Arrays.asList(context.getBeanDefinitionNames());
        String join = String.join(",", beanNames);
        System.out.println(join);
        System.out.println("=========");
//        RepeatTestBean bean = (RepeatTestBean)context.getBean("RepeatTestBean#0");
        System.out.println("================");

    }

}
